/*	Last modify: 12/7/2013	*
 * 	By:	tntho				*
 * 	Description: 			*
 * 	change status property	*
 * 	String -> Status Object	*
 * 							*/

package com.ant.myagile.backlog

import com.ant.myagile.*
import com.ant.myagile.dashboard.*

class Issue implements Comparable {
	String type
	String subject
	String description	
	String priority
	Member assigned
	String remain
	String estimate
	
	static belongsTo = [userStory : UserStory, sprint : Sprint, status: Status]
	static hasMany = [pointRemains : PointRemain]	
	
    static constraints = {
		type(nullable:false, blank:false)
		subject(nullable:false, blank:false)
		description(nullable:false, blank:false, maxSize:1000)
		status(nullable:false, blank:false)
		priority(nullable:false, blank:false) 
		assigned(nullable:true)
    }

	@Override
	public String toString() {
		return subject
			
	}

	@Override
	public int compareTo(Object other) {
		return id.compareTo(other.id);
	}
	
}
